import request from '@/utils/request'
export const addressApi = {
  getList: data => {
    return request({
      url: `/merchantAddr/findAll`,
      method: 'post',
      data
    })
  },
  batchDel: data => {
    return request({
      url: `/merchantAddr/deleteBatch`,
      method: 'delete',
      data
    })
  },
  save: data => {
    return request({
      url: `/merchantAddr/create`,
      method: 'post',
      data
    })
  },
  update: data => {
    return request({
      url: `/merchantAddr/update`,
      method: 'post',
      data
    })
  },
  getDetail: id => {
    return request({
      url: `/merchantAddr/findById`,
      method: 'get',
      params: { id: id }
    })
  }
}
export const baseApi = {
  getList: data => {
    return request({
      url: `/merchantBasic/findAll`,
      method: 'post',
      data
    })
  },
  batchDel: data => {
    return request({
      url: `/merchantBasic/deleteBatch`,
      method: 'delete',
      data
    })
  },
  save: data => {
    return request({
      url: `/merchantBasic/create`,
      method: 'post',
      data
    })
  },
  update: data => {
    return request({
      url: `/merchantBasic/update`,
      method: 'post',
      data
    })
  },
  getDetail: id => {
    return request({
      url: `/merchantBasic/findById`,
      method: 'get',
      params: { id: id }
    })
  }
}
export const bankInfoApi = {
  getList: data => {
    return request({
      url: `/bankInfo/findAll`,
      method: 'post',
      data
    })
  },
  batchDel: data => {
    return request({
      url: `/bankInfo/deleteBatch`,
      method: 'delete',
      data
    })
  },
  save: data => {
    return request({
      url: `/bankInfo/create`,
      method: 'post',
      data
    })
  },
  update: data => {
    return request({
      url: `/bankInfo/update`,
      method: 'post',
      data
    })
  },
  getDetail: id => {
    return request({
      url: `/bankInfo/findById`,
      method: 'get',
      params: { id: id }
    })
  }
}
